<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template('member', 'header'); ?>
<script type="text/javascript">
<!--
	var charset = '<?php echo CHARSET;?>';
	
		function selectcity(val, sel){
			var area = $('#area').val();
			
			$.post("index.php?m=member&c=index&a=getarea", {
				id:val,
				sel:sel
			}, function(data) {
				var d = '<select name="info[area]">'+data.str+'</select>';
				$('#city_letter').val(data.letter);
				$('#area').html("");
				$('#area').html(d);
				
			},"json"
			);
		}
		function select_decoration(val, sel){
			var house_type = $('#house_type').val();
			$.post("index.php?m=member&c=index&a=select_decoration", {
				id:val,
				sel:sel
			}, function(data) {
				if(data.str=='null'){
					var d = '<select disabled="disabled"  name="info[house_type]"><option>请选择</option></select>';
				}
				else{
					var d = '<select   name="info[house_type]">'+data.str+'</select>';
				}
				$('#city_letter').val(data.letter);
				$('#house_type').html("");
				$('#house_type').html(d);
				
			},"json"
			);
		}
//-->
</script>
<link href="<?php echo CSS_PATH;?>dialog.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH;?>dialog.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH;?>content_addtop.js"></script>
<div id="main-content">
<div id="memberArea">
	<?php include template('member', 'left'); ?>
	<div class="right">
    <div class="hd">
      <h3 class="t02"><strong>基本信息</strong></h3>
    </div>
	<div class="bd01"><font class="span05"><img src="<?php echo CSS_PATH;?>images/h_02.gif" /> 尊敬的用户，请您仔细阅读如下说明:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1. 为确保招标的真实有效，请您尽可能如实填写相关内容，招标信息将通过手机短信进行验证，本站不向您收取任何费用。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
2. 本站为保护用户隐私, 本站绝不会在未经合法用户授权时，公开其个人联系方式。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
3. 招标信息需要手机短信验证，时间在2工作日内，如未进行手机验证，您将无法下载和查看装饰公司报价方案以及相关资料 
</div>
	 <div class="hd02">
<ul>
<li><a href="index.php?m=member&c=content&a=published&siteid=1&catid=20" >管理装饰招标</a></li>
<li><a href="index.php?m=member&c=content&a=publish&siteid=1&catid=20" class="hover">发布装饰招标</a></li></ul>
</div> 

				
			<form method="post" action="" id="myform" name="myform">
				<table class="table01">
				<?php if(ROUTE_A=='publish') { ?>
				<script language="JavaScript">
				<!--
					function c_c(catid) {
						location.href='index.php?m=member&c=content&a=publish&siteid=<?php echo $siteid;?>&catid='+catid;
					}
				//-->
				</script>
					<tr style="display:none">
						<th><?php echo L('please_select_cat');?></th>
						<td><?php echo form::select_category('category_content', $catid, 'name="info[catid]" onchange="javascript:c_c(this.value);"','','',0,1,$siteid);?></td>
					</tr>
				<?php } ?>
					<?php $n=1; if(is_array($forminfos)) foreach($forminfos AS $k => $v) { ?>
					<tr>
						<th width="100"><?php if($v['star']) { ?> <font color="red">*</font><?php } ?> <?php echo $v['name'];?>：</th> 
						<td><?php echo $v['form'];?><?php if($v['tips']) { ?><?php echo $v['tips'];?><?php } ?></td>
					</tr>
					<?php $n++;}unset($n); ?>
					<tr>
						<th></th>
						<td>
						<input name="forward" type="hidden" value="<?php echo HTTP_REFERER;?>">
						<input name="id" type="hidden" value="<?php echo $id;?>">
						<input name="dosubmit" type="submit" id="dosubmit" value="<?php echo L('submit');?>" class="button"></td>
					</tr>
				</table>
			</form>

			</div>
			<span class="o1"></span><span class="o2"></span><span class="o3"></span><span class="o4"></span>
		</div>
	</div>
</div>
</div>
</div>
<div class="clear"></div>
<script type="text/javascript"> 
<!--
//只能放到最下面
$(function(){
	$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, 	function(){$(obj).focus();
	boxid = $(obj).attr('id');
	if($('#'+boxid).attr('boxid')!=undefined) {
		check_content(boxid);
	}
	})}});
	<?php echo $formValidator;?>
})
<?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"member\" data=\"op=member&tag_md5=2fadca39422791dd76cc98ceb9ae5c44&action=get_city&return=city\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$member_tag = pc_base::load_app_class("member_tag", "member");if (method_exists($member_tag, 'get_city')) {$city = $member_tag->get_city(array('limit'=>'20',));}?>
	var c = '<select name="info[city]"  onchange="selectcity(this.value);">';
	c +='<option value="0">请选择</option>';
	<?php $n=1; if(is_array($city)) foreach($city AS $k => $v) { ?>
		c += '<option <?php if($data["city"]==$v["linkageid"]) { ?>selected="selected"<?php } ?>  value="<?php echo $v['linkageid'];?>"><?php echo $v['name'];?></option>';
	<?php $n++;}unset($n); ?>
	c += '</select>';
<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
$('#citydiv').html(c);



<?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"member\" data=\"op=member&tag_md5=954574eaa6b75cd671a55b5cc02ee486&action=get_decoration_space&return=city\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$member_tag = pc_base::load_app_class("member_tag", "member");if (method_exists($member_tag, 'get_decoration_space')) {$city = $member_tag->get_decoration_space(array('limit'=>'20',));}?>
var c = '<select name="info[decoration_space]"  onchange="select_decoration(this.value);">';
c +='<option value="0">请选择</option>';
<?php $n=1; if(is_array($city)) foreach($city AS $k => $v) { ?>
	c += '<option <?php if($data["decoration_space"]==$v["linkageid"]) { ?>selected="selected"<?php } ?> value="<?php echo $v['linkageid'];?>"><?php echo $v['name'];?></option>';
	
	<?php $n++;}unset($n); ?>
c += '</select>';
<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
$('#decoration_space').html(c);

<?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"member\" data=\"op=member&tag_md5=549edd8f9119b2cc0c1b823b9a80b348&action=get_decoration_style&return=city\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$member_tag = pc_base::load_app_class("member_tag", "member");if (method_exists($member_tag, 'get_decoration_style')) {$city = $member_tag->get_decoration_style(array('limit'=>'20',));}?>
var c = '<select name="info[decoration_style]" >';
c +='<option value="0">请选择</option>';
<?php $n=1; if(is_array($city)) foreach($city AS $k => $v) { ?>
	c += '<option <?php if($data["decoration_style"]==$v["linkageid"]) { ?>selected="selected"<?php } ?> value="<?php echo $v['linkageid'];?>"><?php echo $v['name'];?></option>';
	
	<?php $n++;}unset($n); ?>
c += '</select>';
<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
	$('#decoration_style').html(c);
<?php if($_GET['a']=='edit') { ?>
selectcity(<?php echo $data['city'];?>, <?php echo $data['area'];?>);
select_decoration(<?php echo $data['decoration_space'];?>,<?php echo $data['house_type'];?>);
<?php } ?>
//-->
</script>

